<?php
/**
 * Created by PhpStorm.
 * User: u
 * Date: 2018/12/14
 * Time: 16:15
 */
namespace common\sources\read\classifyreason;



use common\models\craftsman\ClassifyReason;

class ClassifyReasonAccess implements IClassifyReasonAccess
{
    public function getList($data)
    {
        return ClassifyReason::find()
            ->select("id,class_name,classify_id,reason,create_time")
            ->where(['audit_type' => $data['audit_type']])
            ->orderBy("create_time  desc")
            ->asArray()
            ->all();
    }

    public function getReason($ids) {
        return ClassifyReason::find()
            ->select("id,class_name,classify_id,reason,create_time")
            ->where(['id' => $ids])
            ->asArray()
            ->all();
    }

}